import { ecs } from "../../../core/ecs/ECS";
import { RoomState } from "../../../tsrpc/shared/type/RoomInfo";

@ecs.register('RoomModel')
export class RoomModel extends ecs.Comp {
    roomId: number = -1;
    roomName: string = '';
    users: Set<number> = new Set();
    wss: Set<any> = new Set();
    maxNum:number = 5;
    roomServerAddr:string = "";
    state:RoomState = RoomState.WAITING;

    reset(): void {
        this.roomId= -1;
        this.roomName= '';
        this.users.clear();
        this.maxNum = 5;
        this.state = RoomState.WAITING;
    }
}